<!--
 * @Author: hyq
 * @LastEditors: hyq
 * @Description: 
 * @Date: 2023-12-05 11:21:36
-->
<template>
  <view class="empty-list">
    <image class="empty-list_icon" src="" mode="scaleToFill" />
    <text class="empty-list_tip">{{ props.tip }}</text>
    <slot></slot>
  </view>
</template>

<script setup lang="ts">
const props = withDefaults(
  defineProps<{
    tip?: string
  }>(),
  {
    tip: '暂无相关内容'
  }
)
</script>

<style scoped lang="scss">
.empty-list {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  &_icon {
    width: 400rpx;
    height: 336rpx;
  }
  &_tip {
    height: 80rpx;
    line-height: 160rpx;
    text-align: center;
    color: #777;
  }
}
</style>
